

CREATE TABLE [Role] (
	[ID] [INTEGER] PRIMARY KEY AUTOINCREMENT,
	[Name] [TEXT] NOT NULL,
	[Description] [TEXT]
);

CREATE TABLE [User] (
	[ID] [INTEGER] PRIMARY KEY AUTOINCREMENT,
	[FirstName] TEXT NOT NULL,
	[LastName] TEXT NOT NULL,
	[Age] [INTEGER],
	[SupervisorID] [INTEGER] REFERENCES [User]([ID])
);

CREATE TABLE [UserRole] (
	[UserID] [INTEGER] NOT NULL REFERENCES [User]([ID]),
	[RoleID] [INTEGER] NOT NULL REFERENCES [Role]([ID]),
	PRIMARY KEY([UserID], [RoleID])
);
